package com.dingwen.treasure.business.model.dto;

import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 订单DTO: @NotBlank、@NotEmpty 只能用于 String
 *
 * @author dingwen
 * @date 2022/04/23
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@ToString
public class OrderDto {

    /**
     * 订单 id
     */
    @NotNull(message = "订单 id 不能为空")
    private Long id;

    /**
     * 钱
     */
    @Min(value = 0,message = "金额必须大于0")
    @NotNull(message = "金额不能为空")
    private BigDecimal money;
}
